import {apiRequestList} from "@/common/axios"
import tool from "@/common/tool"
let userMess = JSON.parse(tool.getStorage('userMess'))
let userMessObj = {
  appId: userMess.appId||36
}
// 客户列表
export const customerList = (params)=>{
  return apiRequestList.$post('/dt-business/customer/manager/agg/customerinfo/page/new', Object.assign({}, userMessObj, params, {userId: userMess.userId}))
};
// 人员拥有的楼盘列表
export const userBuilding = (params)=>{
  return apiRequestList.$post('/dt-business/team/user/building/list', Object.assign({}, userMessObj, params, {userId: userMess.userId}))
};
// 渠道配置 - 列表
export const aggChannelGroupList = (params)=>{
  return apiRequestList.$post('/dt-business/channel/aggChannelQueryGroup', Object.assign({}, userMessObj, params))
};
// 后台管理 - 客户管理 - 新增B+客户
export const customerUserAdd = (params)=>{
  return apiRequestList.$post('/dt-business/user/agg/customer/bk/b/plus/customer/add', Object.assign({}, userMessObj, params, {userId: userMess.userId}))
};
// 省市区 行政区域
export const cityBaselist = (params)=>{
  return apiRequestList.$post('/dt-business/base/city/list', Object.assign({}, userMessObj, params))
};
// 客户管理-详情-置业需求
export const customerGetHomeDemand = (params)=>{
  return apiRequestList.$post('/dt-business/customer/getHomeDemand', Object.assign({}, userMessObj, params))
};
// 客户管理-详情-客户画像
export const getCustomerPortrait = (params)=>{
  return apiRequestList.$post('/dt-business/customer/getCustomerPortrait', Object.assign({}, userMessObj, params))
};
// 客户管理-详情-跟进记录
export const followRecordGetByCustomerId = (params)=>{
  return apiRequestList.$post('/dt-business/customer/manager/aggs/customer/followRecord/getByCustomerId', Object.assign({}, userMessObj, params))
};
// 客户管理-详情-客户足迹
export const customerFootprint = (params)=>{
  return apiRequestList.$post('/dt-business/customerTrack/customerFootprint', Object.assign({}, userMessObj, params))///dt-business/customer/manager/aggs/customer/track/page
};
// 客户管理-详情-成交信息
export const businesslist = (params)=>{
  return apiRequestList.$post('/dt-business/order/agg/deal/list', Object.assign({}, params))
};
// 客户管理-详情-客户等级
export const customerGetBasicInfoHalf = (params)=>{
  return apiRequestList.$post('/dt-business/user/userId/customerId', Object.assign({}, userMessObj, params))
};
// 客户管理-详情-认购
export const orderCreate = (params)=>{
  return apiRequestList.$post('/dt-business/order/subscription/create', Object.assign({}, userMessObj, params, {createrId: userMess.userId}))
};
// 客户管理-详情-服务人员
export const userServes = (params)=>{
  return apiRequestList.$post('/dt-business/user/aggs/user/serves', Object.assign({}, userMessObj, params))
};
// 客户管理-详情-签约订单
export const orderSignedCreate = (params)=>{
  return apiRequestList.$post('/dt-business/order/signed/create', Object.assign({}, userMessObj, params, {createrId: userMess.userId}))
};
// 客户管理-成交信息-退购
export const subscriptionUpdate = (params)=>{
  return apiRequestList.$post('/dt-business/order/subscription/update', Object.assign({}, params, {updaterId: userMess.userId, userId: userMess.userId}))
};

// 客户管理-成交信息-退购
export const businessUpdate = (params)=>{
  return apiRequestList.$post('/dt-business/order/signed/update', Object.assign({}, params, {updaterId: userMess.userId}))
};
// 客户管理-到访结果信息
export const aggsPlanByScheduleIdDetails = (params)=>{
  return apiRequestList.$post('/dt-business/app/plan/aggsPlanByScheduleId', Object.assign({}, params, {customerId: userMess.userId}))
};
// 团队人员
export const businessUsers = (params)=>{
  return apiRequestList.$post('/dt-business/team/users', Object.assign({}, userMessObj, params))
};
// 日程-修改
export const businessPlanUpdate = (params)=>{
  return apiRequestList.$post('/dt-business/app/plan/update', Object.assign({}, userMessObj, params, {updaterId: userMess.userId}))
};
// 当前操作人所在城市
export const customerFindBuildingInfo = (params)=>{
  return apiRequestList.$post('/dt-business/building/infoPageByCity', Object.assign({}, userMessObj, params))
};
// 查询中台用户信息 所用cityCode
export const businessUserRealEstate = (params)=>{
  return apiRequestList.$post('/dt-business/user/aggs/user/get', Object.assign({}, userMessObj, params, {userId: userMess.userId}))
};
// 查询中台用户信息 查询其他的不是登录人
export const businessUserRealUserId = (params)=>{
  return apiRequestList.$post('/dt-business/user/aggs/user/get', Object.assign({}, userMessObj, params))
};
// 回访
export const customerAddReturnVisit = (params)=>{
  return apiRequestList.$post('/dt-business/customer/addReturnVisit', Object.assign({}, userMessObj, params, {createrId: userMess.userId,userId: userMess.userId}))
};
// 邀约到访
export const customerAddInvitationToVisit = (params)=>{
  return apiRequestList.$post('/dt-business/customer/addInvitationToVisit', Object.assign({}, userMessObj, params, {createrId: userMess.userId, userId: userMess.userId}))
};
// 来人
export const customerAddBearer = (params)=>{
  return apiRequestList.$post('/dt-business/customer/addBearer', Object.assign({}, userMessObj, params, {createrId: userMess.userId, userId: userMess.userId}))
};
// 查询邀约到访或者来人是否有权操作
export const userGetBelongingUser = (params)=>{
  return apiRequestList.$post('/dt-business/user/userCustomer/getBelongingUser', Object.assign({}, userMessObj, params))
};
// 客户画像-修改
export const customerPortrayalUpdate = (params)=>{
  return apiRequestList.$post('/dt-business/customer/manager/portrayal/update', Object.assign({}, userMessObj, params, {customerId: userMess.userId}))
};
// 置业需求_编辑
export const customerEditHomeDemand = (params)=>{
  return apiRequestList.$post('/dt-business/customer/editCustomerIntention', Object.assign({}, userMessObj, params, {userId: userMess.userId}))
};
// 城市地铁信息
export const metroList = (params)=>{
  return apiRequestList.$post('/dt-business/base/metro/list', Object.assign({}, userMessObj, params))
};
// 城市环线信息
export const looplinePage = (params)=>{
  return apiRequestList.$post('/dt-business/base/loopline/page', Object.assign({}, userMessObj, params))
};
// 客户管理 - 查询 - 基本信息
export const customerBaseInfo = (params)=>{
  return apiRequestList.$post('/dt-business/user/agg/customer/baseInfo', Object.assign({}, userMessObj, params))
};
// 客户管理 - 修改 - 基本信息
export const customeruserEdit = (params)=>{
  return apiRequestList.$post('/dt-business/user/agg/customer/edit', Object.assign({}, userMessObj, params, {userId: userMess.userId}))
};
// 日程-条件查询列表
export const conditionList = (params)=>{
  return apiRequestList.$post('/dt-business/app/plan/condition/list', Object.assign({}, userMessObj, params))
};
// 查询手机号是否已被当前用户在当前楼盘下录入(1:是 2:否)
export const userCustomerCheckPhone = (params)=>{
  return apiRequestList.$post('/dt-business/user/userCustomer/checkIfCreated', Object.assign({}, userMessObj, params, {userId: userMess.userId}))
};
// 查询成交信息列表
export const followRecordVisitResult = (params)=>{
  return apiRequestList.$post('/dt-business/customer/manager/aggs/customer/followRecord/visitResult', Object.assign({}, userMessObj, params))
};
//客户管理-查询-获取关注点
export const getLabelCategory = params=> apiRequestList.$post('/dt-business/customer/getLabelCategory', Object.assign({}, userMessObj, params))
// 渠道配置
export const aggChannelQueryGroup = (params)=>{
  return apiRequestList.$post('/dt-business/channel/aggChannelQueryGroup', Object.assign({}, userMessObj, params))
};
//案场渠道配置
export const aggChannelQueryGroupBuilding = (params)=>{
  return apiRequestList.$post('/dt-business/channel/queryBaseChannelBuilding', Object.assign({}, userMessObj, params,{userId: userMess.userId}))
};
// 人员的团队列表
export const teams = (params)=>{
  return apiRequestList.$post('/dt-business/team/teams', Object.assign({}, userMessObj, params, {userId: userMess.userId}))
};
// 获取表头信息
export const customerinfoHeadList = (params)=>{
  return apiRequestList.$post('/dt-business/customerHead/listByBuildingId', Object.assign({}, userMessObj, params))
};
//德勤 客户管理列表
export const getCustomerList = (params)=>{
  return apiRequestList.$post('/dt-business/customerInfoList/getCustomerList', Object.assign({}, userMessObj, params, {userId: userMess.userId}))
};
//编辑表头
export const updateZtCustomerHead = (params)=>{
  return apiRequestList.$post('/dt-business/customerHead/updateZtCustomerHead', Object.assign({}, userMessObj, params, {updaterId: userMess.userId}))
};
//聚合-用户-客户接口
export const customerDetailsInfo = (params)=>{
  return apiRequestList.$post('/dt-business/customer/manager/agg/customerinfo/get', Object.assign({}, params, userMessObj))
};
//DT客户详情
export const customerDTDetailsInfo = (params)=>{
  return apiRequestList.$post('/dt-business/customer/manager/agg/customerinfo/dt/get', Object.assign({},userMessObj, params))
};
//新DT客户详情 customerDy/getCustomerInfoAll
export const getCustomerInfoAll = (params)=>{
  return apiRequestList.$post('/dt-business/customerDy/getCustomerInfoAll', Object.assign({},userMessObj, params))
};
// export const customerDTDetailsInfo = (params)=>{
//   return apiRequestList.$post('/dt-business/report/reportDetail', Object.assign({},userMessObj, params))
// };
//DT客户详情 城市code，楼盘名称，归属楼盘，归属顾问
export const customerFindSpecial = (params)=>{
  return apiRequestList.$post('/dt-business/user/agg/customer/findSpecial', Object.assign({}, userMessObj, params, {userId: userMess.userId}))
};

//导入台账
// 导入台账的列表


export const importCustomerList = (params)=>{
  return apiRequestList.$post('/dt-business/userImportParameterRecord/getList', Object.assign({}, userMessObj, params))
};

export const exportParameterExcel = (params)=>{
  return apiRequestList.$post('/dt-business/userImportParameterRecord/exportParameterExcel', Object.assign({}, userMessObj, params))
};




// 客户分配相关
// 根据案场查询所有顾问
export const adviserList = (params)=>{
  return apiRequestList.$post('/dt-business/bg/user/qryByBuildingId', Object.assign({}, userMessObj, params))
};

//客户管理列表(不传 userId)
export const getCustomerList1 = (params)=>{
  return apiRequestList.$post('/dt-business/customerInfoList/getCustomerList', Object.assign({}, userMessObj, params))
};

//专案客户分配

export const customerAssignment = (params)=>{
  return apiRequestList.$post('/dt-business/bg/customer/distribute', Object.assign({}, userMessObj, params))
};




// DT1.4表头调整接口
// 客户列表表头-编辑显示字段列表查询


export const customerHeadList = (params)=>{
  return apiRequestList.$post('/dt-business/customerHead/list', Object.assign({}, userMessObj, params))
};


//客户表头修改
export const customerHeadUpdate = (params)=>{
  return apiRequestList.$post('/dt-business/customerHead/update', Object.assign({}, userMessObj, params))
};

//客户跟进记录
export const followUp = (params)=>{
  return apiRequestList.$post('/dt-business/followUpRecord/getFollowUp', Object.assign({}, userMessObj, params))
};

// 更新跟进记录


export const updateFollowUp = (params)=>{
  return apiRequestList.$post('/dt-business/followUpRecord/updateFollowUp', Object.assign({}, userMessObj, params))
};

// 插入批注
export const insertFollowUp = (params)=>{
  return apiRequestList.$post('/dt-business/followUpRecord/insertFollowUp', Object.assign({}, userMessObj, params))
};

// 客户列表新的
export const getCustomerListNew = (params)=>{
  return apiRequestList.$post('/dt-business/web/customer/list', Object.assign({}, userMessObj, params))
};


//客户动态列表接口

export const webGetCustomerDynamicList = (params)=>{
  return apiRequestList.$post('dt-business/customerDy/webGetCustomerDynamicList', Object.assign({}, userMessObj, params))
};

//筛选顾问列表

export const getUserByName = (params)=>{
  return apiRequestList.$post('/dt-business/web/customer/user/getUserByName', Object.assign({}, userMessObj, params),'formData')
};



//筛选面积价钱等
export const selectAggregationCriteria = (params)=>{
  return apiRequestList.$post('/dt-business/building/selectAggregationCriteria', Object.assign({}, userMessObj, params))
};







